package xjtu.se.articlecommunity.admin.info.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import xjtu.se.articlecommunity.admin.info.InfoService;
import xjtu.se.articlecommunity.admin.info.dao.InfoDao;
import xjtu.se.articlecommunity.admin.info.dto.Admin;
import xjtu.se.articlecommunity.common.dto.CurrentUser;

import javax.annotation.Resource;

@Service
@Transactional
public class InfoServiceImpl implements InfoService {

    @Resource
    private InfoDao infoDao;

    @Override
    public void updatePwd(Admin admin) {
        infoDao.updatePwd(admin);
    }

    @Override
    public void updateTel(Admin admin) {
        infoDao.updateTel(admin);
    }

    @Override
    public Admin getInfo(CurrentUser currentUser) {
        return infoDao.getInfo(currentUser);
    }

    @Override
    public void updateMail(Admin admin) {
        infoDao.updateMail(admin);
    }
}
